//
//@File    :	5.19_textin4.cpp
//@Time    :	2021/08/06 18:17:02
//@Auther  :	Sun Sheng
//@Contact :	970340843@qq.com
//@Desc    :	reading chars with cin.get()
//

#include <iostream>

using namespace std;
int main()
{
    int ch;
    int count = 0;

    while ((ch = cin.get()) != EOF)
    {
        cout.put(char(ch));
        ++count;
    }
    cout << endl
         << count << " characters read\n";
    system("pause");
    return 0;
}